package com.wzh.customer.service;

import com.wzh.provider.service.TicketService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    //用户想拿到provider-server提供的票，需要去注册中心拿
    @Reference
    TicketService ticketService;
    public void buyTicket(){
        String ticket = ticketService.getTicket();
        System.out.println("从注册中心拿到了"+ticket);
    }

}
